//
//  HHConversationViewController.h
//  HHChatKit
//
//  Created by Henry on 2021/5/10.
//

#import <UIKit/UIKit.h>
#import "HHConversationCell.h"
#import "HHConversationModel.h"

NS_ASSUME_NONNULL_BEGIN

@protocol HHConversationViewControllerDelegagte <NSObject>

@optional

- (void)conversationDidSelectNoNet;

- (void)conversationDidSelectRow:(HHConversationModel *)conversation indexPath:(NSIndexPath *)indexPath;

- (void)conversationConfigCell:(HHConversationCell *)cell indexPath:(NSIndexPath *)indexPath;

@end

@interface HHConversationViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, weak) id<HHConversationViewControllerDelegagte> delegate;

@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) NSMutableArray<HHConversationModel *> *dataArray;

/// 配置Navigation，或者自己实现
- (void)setupNavigation;
/// 只有配置了Navigation，才有效
- (void)setNavTitle:(NSString *)title;
- (void)setNavTitle:(NSString *)title animating:(BOOL)animating;
/// 配置RightItem，或者自己实现
- (void)setupRightItem;
/// 只有配置了RightItem，才有效，重写
- (void)onClickRightItem:(UIButton *)sender;

- (void)addNoNet;
- (void)removeNoNet;

- (NSArray *)sortDataList:(NSMutableArray<HHConversationModel *> *)dataList;

- (void)removeIndexPath:(NSIndexPath *)indexPath;

@end

NS_ASSUME_NONNULL_END
